this.setName(nameText);
},
+ setSensitive: function(sensitive) {
+ this.actor.reactive = sensitive;
+ this.actor.can_focus = sensitive;
+ this.actor.track_hover = sensitive;
+ },
+
setName: function(text) {
if (text != null) {
// This is the easiest way to provide a accessible name to
hasRunDialog: false,
hasWorkspaces: false,
hasWindows: false,
+ isLocked: true,
components: ['networkAgent', 'polkitAgent', 'telepathyClient'],
panel: {
left: ['userMenu'],
hasWorkspaces: true,
hasWindows: true,
createUnlockDialog: Main.createSessionUnlockDialog,
+ isLocked: false,
components: ['networkAgent', 'polkitAgent', 'telepathyClient',
'keyring', 'recorder', 'autorunManager', 'automountManager'],
panel: {
style_class: 'popup-menu-icon' });
this._pendingIcon = new St.Icon({ icon_name: 'user-status-pending-symbolic',
style_class: 'popup-menu-icon' });
+ this._lockedIcon = new St.Icon({ icon_name: 'changes-prevent-symbolic',
+ style_class: 'popup-menu-icon' });
this._accountMgr.connect('most-available-presence-changed',
Lang.bind(this, this._updatePresenceIcon));
let allowSettings = Main.sessionMode.allowSettings;
this._statusChooser.setSensitive(allowSettings);
this._systemSettings.visible = allowSettings;
+
+ this.setSensitive(!Main.sessionMode.isLocked);
+ this._updatePresenceIcon();
},
_onDestroy: function() {
},
_updatePresenceIcon: function(accountMgr, presence, status, message) {
- if (presence == Tp.ConnectionPresenceType.AVAILABLE)
+ if (Main.sessionMode.isLocked)
+ this._iconBox.child = this._lockedIcon;
+ else if (presence == Tp.ConnectionPresenceType.AVAILABLE)
this._iconBox.child = this._availableIcon;
else if (presence == Tp.ConnectionPresenceType.BUSY)
this._iconBox.child = this._busyIcon;